//
// GPSMapEdit
// (c) Konstantin Galichsky (kg@geopainting.com), 2002-2004
//
// Object filter by type.
// NOTE: the code is incomplete.
//

# include "StdAfx.h"
# include "Resource.h"
# include "LabelFilter.h"
# include "Types.h"
# include "ChangeType.h"
# include "Map.h"
# include "Globals.h"

INT_PTR CALLBACK CLabelFilter::DlgProc (HWND _hWnd, UINT _uMsg, WPARAM _wParam, LPARAM _lParam) {
	CLabelFilter * const pThis = reinterpret_cast<CLabelFilter *> (::GetWindowLong (_hWnd, GWL_USERDATA));

	switch (_uMsg) {
		case WM_INITDIALOG: {
			CLabelFilter * const pThis = reinterpret_cast<CLabelFilter *> (_lParam);
			::SetWindowLong (_hWnd, GWL_USERDATA, _lParam);

			::SetDlgItemText (_hWnd, IDC_PATTERN, pThis->m_strPattern.c_str ());

			// TODO:

			return TRUE;
		}
	}

	return FALSE;
}

bool CLabelFilter::ShowSettings (HWND _hWnd) {
	return DlgBox (IDD_FILTER_LABEL, _hWnd, CLabelFilter::DlgProc, reinterpret_cast<LPARAM> (this)) == 0;
}

void CLabelFilter::GetName (string_t & _strName) const {
	_strName.append ("label");
}

bool CLabelFilter::DoesFit (const rgn_t & _rgn) const {
	// TODO:
	return false;
}
